package com.lin.cloud.disk.service;

import com.lin.cloud.disk.entity.pojo.UserDepartment;

import java.util.List;

/**
 * (UserDepartment)表服务接口
 *
 * @author ljc
 * @since 2020-12-10 16:48:13
 */
public interface IUserDepartmentService {


    /**
     * 通过用户ID查询部门ID列表
     * @param userId
     * @return
     */
    List<Long> selectDepartmentIdListByUserId(Long userId);

    /**
     * 添加用户与部门的映射
     * @param userDepartment
     */
    void insert(UserDepartment userDepartment);


    /**
     * 通过部门ID列表查询用户ID列表
     * @param departmentIdList
     * @return
     */
    List<Long> selectUserIdListByDepartmentIdList(List<Long> departmentIdList);


    /**
     * 批量插入用户部门关系
     * @param userDepartmentList
     */
    void batchInsertUserDepartment(List<UserDepartment> userDepartmentList);


    /**
     * 批量删除用户部门关系
     * @param departmentId
     * @param unAllocationUserList
     */
    void batchRemoveUserDepartment(Long departmentId, List<Long> unAllocationUserList);
}